<!--
 * @Author: HeAo
 * @Date: 2021-12-29 09:28:45
 * @LastEditTime: 2021-12-29 09:36:04
 * @LastEditors: HeAo
 * @Description: 
 * @FilePath: \study\day04\2-vue列表渲染.html
 * 别乱动！
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>

<body>
  <div id="app">
    <table>
      <thead>
        <th>编号</th>
        <th>姓名</th>
        <th>年龄</th>
      </thead>
      <tbody>
        <tr v-for="(item, index) in students">
          <td>{{item.id}}</td>
          <td>{{item.name}}</td>
          <td>{{item.age}}</td>
        </tr>
      </tbody>
    </table>
  </div>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        students: [
          { id: 1, name: 'larry', age: 12 },
          { id: 2, name: 'terry', age: 13 },
          { id: 3, name: 'tom', age: 14 },
          { id: 4, name: 'jacky', age: 16 },
        ]
      },
      methods: {

      }
    })
  </script>
</body>

</html>